Language translation using embeddable component

ABSTRACT

Aspects of the subject matter described herein relate to language translation. In aspects, a reference to a language translation component is embedded or otherwise inserted into a Web page. When the Web page is rendered, code corresponding to the language translation component may be downloaded and executed. Once executed, the translation component may access other content in the Web page and allow a user to request translation of the Web page. Upon receiving an indication that translation is desired, the translation component may send content in the Web page to a translation service and receive translated content. The translation component may then provide this translated content to a user viewing the Web page.

BACKGROUND

With the many language spoken in the world, Web pages may be found inmany different languages. To assist in understanding these Web pages,some companies have provided language translation sites. A user maynavigate to a translation web site, enter text or a reference to a webpage to translate, and receive translated text. This mechanism forlanguage translation is cumbersome and sometimes renders pages inundesirable ways.

The subject matter claimed herein is not limited to embodiments thatsolve any disadvantages or that operate only in environments such asthose described above. Rather, this background is only provided toillustrate one exemplary technology area where some embodimentsdescribed herein may be practiced.

SUMMARY

Briefly, aspects of the subject matter described herein relate tolanguage translation. In aspects, a reference to a language translationcomponent is embedded or otherwise inserted into a Web page. When theWeb page is rendered, code corresponding to the language translationcomponent may be downloaded and executed. Once executed, the translationcomponent may access other content in the Web page and allow a user torequest translation of the Web page. Upon receiving an indication thattranslation is desired, the translation component may send content inthe Web page to a translation service and receive translated content.The translation component may then provide this translated content to auser viewing the Web page.

This Summary is provided to briefly identify some aspects of the subjectmatter that is further described below in the Detailed Description. ThisSummary is not intended to identify key or essential features of theclaimed subject matter, nor is it intended to be used to limit the scopeof the claimed subject matter.

The phrase “subject matter described herein” refers to subject matterdescribed in the Detailed Description unless the context clearlyindicates otherwise. The term “aspects” is to be read as “at least oneaspect.” Identifying aspects of the subject matter described in theDetailed Description is not intended to identify key or essentialfeatures of the claimed subject matter.

The aspects described above and other aspects of the subject matterdescribed herein are illustrated by way of example and not limited inthe accompanying figures in which like reference numerals indicatesimilar elements and in which:

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram representing an exemplary general-purposecomputing environment into which aspects of the subject matter describedherein may be incorporated;

FIG. 2 is a block diagram representing an exemplary environment in whichaspects of the subject matter described herein may be implemented;

FIG. 3 illustrates elements of an exemplary Web page in accordance withaspects of the subject matter described herein;

FIG. 4 is a block diagram that represents an apparatus configured inaccordance with aspects of the subject matter described herein;

FIG. 5 is a block diagram that generally represents exemplary actionsthat may occur on a client in accordance with aspects of the subjectmatter described herein;

FIG. 6 is a block diagram that generally represents exemplary actionsthat may occur in creating and providing a Web page having a referenceto a translation component in accordance with aspects of the subjectmatter described herein;

FIG. 7 is a block diagram that generally represents exemplary actionsthat may occur in providing code for a translation component inaccordance with aspects of the subject matter described herein; and

FIG. 8 is a block diagram that generally represents exemplary actionsthat may occur in translating content in accordance with aspects of thesubject matter described herein.

DETAILED DESCRIPTION Definitions

As used herein, the term “includes” and its variants are to be read asopen-ended terms that mean “includes, but is not limited to.” The term“or” is to be read as “and/or” unless the context clearly dictatesotherwise. The term “based on” is to be read as “based at least in parton.” Other definitions, explicit and implicit, may be included below.

Exemplary Operating Environment

FIG. 1 illustrates an example of a suitable computing system environment100 on which aspects of the subject matter described herein may beimplemented. The computing system environment 100 is only one example ofa suitable computing environment and is not intended to suggest anylimitation as to the scope of use or functionality of aspects of thesubject matter described herein. Neither should the computingenvironment 100 be interpreted as having any dependency or requirementrelating to any one or combination of components illustrated in theexemplary operating environment 100.

Aspects of the subject matter described herein are operational withnumerous other general purpose or special purpose computing systemenvironments or configurations. Examples of well known computingsystems, environments, or configurations that may be suitable for usewith aspects of the subject matter described herein comprise personalcomputers, server computers, hand-held or laptop devices, multiprocessorsystems, microcontroller-based systems, set-top boxes, programmableconsumer electronics, network PCs, minicomputers, mainframe computers,personal digital assistants (PDAs), gaming devices, printers, appliancesincluding set-top, media center, or other appliances,automobile-embedded or attached computing devices, other mobile devices,distributed computing environments that include any of the above systemsor devices, and the like.

Aspects of the subject matter described herein may be described in thegeneral context of computer-executable instructions, such as programmodules, being executed by a computer. Generally, program modulesinclude routines, programs, objects, components, data structures, and soforth, which perform particular tasks or implement particular abstractdata types. Aspects of the subject matter described herein may also bepracticed in distributed computing environments where tasks areperformed by remote processing devices that are linked through acommunications network. In a distributed computing environment, programmodules may be located in both local and remote computer storage mediaincluding memory storage devices.

With reference to FIG. 1, an exemplary system for implementing aspectsof the subject matter described herein includes a general-purposecomputing device in the form of a computer 110. A computer may includeany electronic device that is capable of executing an instruction.Components of the computer 110 may include a processing unit 120, asystem memory 130, and a system bus 121 that couples various systemcomponents including the system memory to the processing unit 120. Thesystem bus 121 may be any of several types of bus structures including amemory bus or memory controller, a peripheral bus, and a local bus usingany of a variety of bus architectures. By way of example, and notlimitation, such architectures include Industry Standard Architecture(ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA)bus, Video Electronics Standards Association (VESA) local bus,Peripheral Component Interconnect (PCI) bus also known as Mezzanine bus,Peripheral Component Interconnect Extended (PCI-X) bus, AdvancedGraphics Port (AGP), and PCI express (PCIe).

The computer 110 typically includes a variety of computer-readablemedia. Computer-readable media can be any available media that can beaccessed by the computer 110 and includes both volatile and nonvolatilemedia, and removable and non-removable media. By way of example, and notlimitation, computer-readable media may comprise computer storage mediaand communication media.

Computer storage media includes both volatile and nonvolatile, removableand non-removable media implemented in any method or technology forstorage of information such as computer-readable instructions, datastructures, program modules, or other data. Computer storage mediaincludes RAM, ROM, EEPROM, flash memory or other memory technology,CD-ROM, digital versatile discs (DVDs) or other optical disk storage,magnetic cassettes, magnetic tape, magnetic disk storage or othermagnetic storage devices, or any other medium which can be used to storethe desired information and which can be accessed by the computer 110.

Communication media typically embodies computer-readable instructions,data structures, program modules, or other data in a modulated datasignal such as a carrier wave or other transport mechanism and includesany information delivery media. The term “modulated data signal” means asignal that has one or more of its characteristics set or changed insuch a manner as to encode information in the signal. By way of example,and not limitation, communication media includes wired media such as awired network or direct-wired connection, and wireless media such asacoustic, RF, infrared and other wireless media. Combinations of any ofthe above should also be included within the scope of computer-readablemedia.

The system memory 130 includes computer storage media in the form ofvolatile and/or nonvolatile memory such as read only memory (ROM) 131and random access memory (RAM) 132. A basic input/output system 133(BIOS), containing the basic routines that help to transfer informationbetween elements within computer 110, such as during start-up, istypically stored in ROM 131. RAM 132 typically contains data and/orprogram modules that are immediately accessible to and/or presentlybeing operated on by processing unit 120. By way of example, and notlimitation, FIG. 1 illustrates operating system 134, applicationprograms 135, other program modules 136, and program data 137.

The computer 110 may also include other removable/non-removable,volatile/nonvolatile computer storage media. By way of example only,FIG. 1 illustrates a hard disk drive 141 that reads from or writes tonon-removable, nonvolatile magnetic media, a magnetic disk drive 151that reads from or writes to a removable, nonvolatile magnetic disk 152,and an optical disc drive 155 that reads from or writes to a removable,nonvolatile optical disc 156 such as a CD ROM or other optical media.Other removable/non-removable, volatile/nonvolatile computer storagemedia that can be used in the exemplary operating environment includemagnetic tape cassettes, flash memory cards, digital versatile discs,other optical discs, digital video tape, solid state RAM, solid stateROM, and the like. The hard disk drive 141 is typically connected to thesystem bus 121 through a non-removable memory interface such asinterface 140, and magnetic disk drive 151 and optical disc drive 155are typically connected to the system bus 121 by a removable memoryinterface, such as interface 150.

The drives and their associated computer storage media, discussed aboveand illustrated in FIG. 1, provide storage of computer-readableinstructions, data structures, program modules, and other data for thecomputer 110. In FIG. 1, for example, hard disk drive 141 is illustratedas storing operating system 144, application programs 145, other programmodules 146, and program data 147. Note that these components can eitherbe the same as or different from operating system 134, applicationprograms 135, other program modules 136, and program data 137. Operatingsystem 144, application programs 145, other program modules 146, andprogram data 147 are given different numbers herein to illustrate that,at a minimum, they are different copies.

A user may enter commands and information into the computer 20 throughinput devices such as a keyboard 162 and pointing device 161, commonlyreferred to as a mouse, trackball, or touch pad. Other input devices(not shown) may include a microphone, joystick, game pad, satellitedish, scanner, a touch-sensitive screen, a writing tablet, or the like.These and other input devices are often connected to the processing unit120 through a user input interface 160 that is coupled to the systembus, but may be connected by other interface and bus structures, such asa parallel port, game port or a universal serial bus (USB).

A monitor 191 or other type of display device is also connected to thesystem bus 121 via an interface, such as a video interface 190. Inaddition to the monitor, computers may also include other peripheraloutput devices such as speakers 197 and printer 196, which may beconnected through an output peripheral interface 190.

The computer 110 may operate in a networked environment using logicalconnections to one or more remote computers, such as a remote computer180. The remote computer 180 may be a personal computer, a server, arouter, a network PC, a peer device or other common network node, andtypically includes many or all of the elements described above relativeto the computer 110, although only a memory storage device 181 has beenillustrated in FIG. 1. The logical connections depicted in FIG. 1include a local area network (LAN) 171 and a wide area network (WAN)173, but may also include other networks. Such networking environmentsare commonplace in offices, enterprise-wide computer networks,intranets, and the Internet.

When used in a LAN networking environment, the computer 110 is connectedto the LAN 171 through a network interface or adapter 170. When used ina WAN networking environment, the computer 110 may include a modem 172or other means for establishing communications over the WAN 173, such asthe Internet. The modem 172, which may be internal or external, may beconnected to the system bus 121 via the user input interface 160 orother appropriate mechanism. In a networked environment, program modulesdepicted relative to the computer 110, or portions thereof, may bestored in the remote memory storage device. By way of example, and notlimitation, FIG. 1 illustrates remote application programs 185 asresiding on memory device 181. It will be appreciated that the networkconnections shown are exemplary and other means of establishing acommunications link between the computers may be used.

Language Translation

As mentioned previously, language translation mechanisms for the Web arecumbersome and sometimes render pages in undesirable ways. FIG. 2 is ablock diagram representing an exemplary environment in which aspects ofthe subject matter described herein may be implemented. The environmentmay include a client 205, a Web server 210, a translation componentprovider 215, a translation service 217, and may include other entities(not shown). The client may include a Web browser 220 that may include,generate, or download a translation component 225.

The various entities illustrated in FIG. 2 may be located relativelyclose to each other or may be distributed throughout the world. Thevarious entities may communicate with each other via one or more localarea networks, wide area networks, direct connections, virtualconnections, private networks, virtual private networks, inter- andintra-process communication channels, shared memory, some combination ofthe above, and the like.

The client 205, Web server 210, translation component provider 215, andtranslation service 217 may comprise or reside on one or more computingdevices. Such devices may include, for example, personal computers,server computers, hand-held or laptop devices, multiprocessor systems,microcontroller-based systems, set-top boxes, programmable consumerelectronics, network PCs, minicomputers, mainframe computers, cellphones, personal digital assistants (PDAs), gaming devices, printers,appliances including set-top, media center, or other appliances,automobile-embedded or attached computing devices, other mobile devices,distributed computing environments that include any of the above systemsor devices, and the like. An exemplary device that may be configured toact as the client 205, the Web server 210, or the translation service217 comprises the computer 110 of FIG. 1.

The Web server 210, translation component provider 215, and translationservice 217 may be implemented as one or more processes. The term“process” and its variants as used herein may include one or moretraditional processes, threads, components, libraries, objects thatperform tasks, and the like. A process may be implemented in hardware,software, or a combination of hardware and software. In an embodiment, aprocess is any mechanism, however called, capable of or used inperforming an action. A process may be distributed over multiple devicesor a single device.

Although the terms “client” and “server” are sometimes used herein, itis to be understood, that a client may be implemented on a machine thathas hardware and/or software that is typically associated with a serverand that likewise, a server may be implemented on a machine that hashardware and/or software that is typically associated with a desktop,personal, or mobile computer. Furthermore, a client may at times act asa server and vice versa. In an embodiment, the client 205 and the server210 may, at various times, both be peers, servers, or clients. In oneembodiment, the client 205 and the server 210 may be implemented on thesame physical machine.

The Web browser 220 is a component that allows a user to view andinteract with Web pages. In operation, the Web browser 220 may receive arequest to view a particular Web page on the Web server 210 and mayrequest data corresponding to the Web page from the Web server 210. Inconjunction with receiving the data, the Web browser 220 may render theWeb page on a user interface associated with the client 205.

Data of a Web page may be divided into multiple portions that may beindependently accessed by a renderer. A Document Object Model (DOM) maybe used to access and manipulate these portions. These portions mayinclude graphics, text, user interface elements, code, a reference toone of the above, a combination of two or more the above, and the like.Tags such as “div” and “/div” may be used to indicate where a particularportion begins and ends. Other tags may also serve to indicate whereportions of a Web page begin and end.

As a renderer renders a Web page, it may come across a portion thatindicates a script to execute. This portion may indicate that the scriptmay be found on a server (e.g., the translation component provider 215)identified by a Uniform Resource Identifier (URI). When the rendererbegins to render such a portion of the Web page, the renderer maycontact the server identified by the URI to obtain the script.

A script includes code that may be executed. Code includes instructionsthat indicate the actions a computer is to take. Code may also includedata, resources, variables, definitions, relationships, associations,and the like that include information other than actions the computer isto take. A browser may support JavaScript, JScript, another type ofEMCAScript, another type of language, and the like.

In one embodiment, when a renderer comes across a portion of a Web pagethat indicates a script to execute, the renderer may download andexecute the script to create a translation component 225. Thetranslation component 225 may then be used to translate text in a Webpage from one language to another language.

A portion of data in a Web page that indicates a script to execute tocreate a translation component 225 is sometimes referred to herein as atranslation component snippet. An exemplary translation componentsnippet is as follows:

<div id=“MicrosoftTranslatorWidget” style=“width: 200px; min-height: 0px; border-color:#3A5770; background-color: #78ADD0;”> <noscript> <ahref=“http://www.microsofttranslator.com/BV.aspx?a=http%3a%2f%2fviks.org%2f”>  Translate this page</a><br />  Translationpowered by <a  href=“http://www.microsofttranslator.com/”>Microsoft ® Translator</a> </noscript> </div> <scriptid=“MicrosoftTranslatorWidgetScript” type=“text/javascript”src=“http://api.microsofttranslator.com/V1/Widget.svc/Embed?appld=SM0SH6dehT8aMefYwlnW6dh03oVhYVdo&from=en&layout=ts”> </script>

For browsers that do not support or that have client-side scriptingdisabled, the <noscript> . . . </noscript> portion above provides a linkto a translator Web page (e.g., Microsoft translator) and indicates aWeb page to translate (e.g., http://viks.org). Browsers that do notsupport or that have client-side scripting disabled may navigate to thetranslator Web page and may pass the URI of the Web page to translate.

The <script> tag includes the identifier of a script, the type of thescript, and a reference (e.g., a URI) where the script may be found. Forbrowsers that support and have client-side scripting enabled, the<script> . . . </script> portion above causes the renderer to execute ascript having a URI of http://api.microsofttranslator.com/V1/Widget.svc.Executing the script causes the translation component 225 to beinstantiated. The translation component 225 may display a user interfacesimilar to the one illustrated in FIG. 3.

The appId=SM0SH6dehT8aMefYwlnW6dh03oVhYVdo indicated above is aparameter that may be used to verify that the translation component 225is authorized to access the translation service 217 for a particular Website. For example, the parameter may encode a URI or a Web page througha secret hash function known to the translation service 217. When arenderer attempts to download the script to instantiate the translationcomponent 225, the renderer may provide the parameter to the translationservice 217. The translation service 217 may check the parameter andother information from the Web page to determine whether the Web browser220 is to be given access to the script.

The appId may also be used to provide selective access to variousfeatures and services. For example, the appId may be associated withbandwidth throttling, whether advertisements are provided by thetranslation component 225, other features and services, and the like.Recognizing the features and services may be accomplished, for example,via an appId table hosted on the translation component provider 215 ortranslation service 217, by hashing the features into the appIdbeforehand, or the like.

In an embodiment, the appId parameter may be omitted. In thisembodiment, the translation service 217 may forgo determining whether arequesting Web browser is allowed to access the script corresponding tothe translation component 225.

In another embodiment, the translation service 217 may use informationother than or in addition to the appId to determine whether to allow therequesting Web browser to access the script and to determine whatfeatures and services, if any, to provide the requesting Web browser.This other information may include, for example, an IP address whitelist, a mechanism of identifying the site of the Web browser or the Webpage, a user or other ID associated with the Web browser, and the like.

In an embodiment, the translation component 225 may be injected into aWeb page via a button displayed by the Web browser 220, a bookmarklet(e.g., a software component that runs in the context of the Web browser220), a browser script, a browser add-on, some combination of the above,and the like.

The translation component 225 may execute in the context of the Web pageand may thus have access to the DOM of the Web page. Having access tothe DOM, the translation component 225 may obtain text in the DOM andmay translate the text to another language.

To translate text to another language, the translation component 225 mayenumerate one or more objects of a document object model correspondingto the Web page and send text found therein to the translation service217. The translation service 217 may apply machine translation or othertranslation techniques to determine a translation for the text. Afterthe translation service 217 has translated the text, the translationservice 217 may then send the translated text back to the translationcomponent 225. The translation component 225 may then display or makeavailable the translated text to a user of the client 205.

In an embodiment, portions of the Web page may be marked (e.g., by aWebmaster, user, or the like) to indicate that they may or may not betranslated via the translation component 225. For example, one or morepairs of tags in the Web page may indicate portions that may or may notbe translated by the translation components. In the absence of suchtags, the translation component 225 may default to translate or to nottranslate content or may determine whether it is to translate or nottranslate based on content, user preferences, or the like.

Images included in the DOM of the Web page may also be sent to thetranslation service 217. The translation service 217 may attempt providesubstitute images that are suitable for the translation provided. In oneembodiment, the translation service 217 may attempt to find acorresponding image for the new language to which text on the Web pageis translated. In another embodiment, the translation service 217 mayattempt to recognize text in the image and to translate the text in theimage to the new language. In another embodiment, the translationservice 217 may leave the image as is and may rely on add components, ifany, within the Web page to find a new image appropriate to thetranslation.

In some embodiments, for security reasons, a Web browser may display awarning if a component in the Web browser attempts to access a serverthat was not originally indicated in the Web page. For example, if thetranslation component 225 attempts to directly access a server thathosts the translation service 217, the Web browser 220 may display awarning to indicate this action. To avoid this type of a warning, thetranslation component 225 may send text to be translated to thetranslation component provider 215. The translation component provider215 may then send this text to the translation service 217, receivetranslated text, and send the translated text back to the translationcomponent 225. This may be done to avoid the warning describedpreviously.

The text that the translation component provider 215 sends to thetranslation service 217 may be derived from the text sent by thetranslation component 225 to the translation component provider 215. Forexample, the translation component provider 215 may add or remove tagsto the text before sending it to the translation service 217. Thetranslation component provider 215 may also add or remove tags or otherdata before sending a response to the translation component 225. Thismay be done, for example, to cause certain display features such asdisplaying translated or original text when a cursor is hovered on ornear certain text as described below.

Although the environment described above includes various numbers of theentities and related infrastructure, it will be recognized that more,fewer, or a different combination of these entities and others may beemployed without departing from the spirit or scope of aspects of thesubject matter described herein. Furthermore, the entities andcommunication networks included in the environment may be configured ina variety of ways as will be understood by those skilled in the artwithout departing from the spirit or scope of aspects of the subjectmatter described herein.

FIG. 3 illustrates elements of an exemplary Web page in accordance withaspects of the subject matter described herein. The Web page 305 mayinclude one or more portions 311-316. The portions may be organized by aDOM and may include graphics, text, user interface elements, code, areference to one of the above, a combination of two or more of theabove, and the like. In particular, the portion 315 may include areference (e.g., a URI) to a service from which code corresponding to atranslation component may be obtained.

The translation component may include a language selection element 325that allows a user to select a language into which content on the Webpage 305 is to be translated. In an embodiment, information associatedwith a user (e.g., a user profile) may be used to determine userpreferences. A user preference may indicate the language the userprefers, how the user wants source and target languages displayed,another preference, and the like. The translation component may formatand display content in accordance with the user preferences. Where thetranslation component does not have access to user preferences, thetranslation component may look at preferences (e.g., preferred languagemarkers) indicated in the Web page, if any.

The translation component may also include a button 330 or other elementthat allows the user to indicate that translation is to occur. Inaddition, the translation component may provide one or moreadvertisements.

In an embodiment, any advertisements provided by the translationcomponent may be collocated with the portion 315. In other embodiments,the advertisements associated with the translation component may beplaced in various places within the Web page. The advertisementsassociated with the translation component may be selected based on auser profile, preferences associated with the Web page, content of theWeb page, and the like. The advertisements associated with thetranslation component may be in addition to other advertisements, ifany, included in the Web page.

The translation component may also indicate additional informationregarding a translation. For example, the translation component mayhighlight, underline, or otherwise mark certain words or phrases. When auser clicks on a button or other user interface element, or selects,hovers a cursor over, or otherwise interacts with these words or phrasesvia a user interface, a definition, synonym, antonym, transliteration,or other information regarding the word or phrase may be displayed tothe user. If a highlighted word or phrase includes a definition in onelanguage but not in another language, the translation component mayobtain a translation of the definition to provide to the user.

The translation component may also include one or more user elementsthat allow the user to indicate how the user wants translationsdisplayed. Some exemplary contemplated formats include replacing contentwith translated content in place, displaying the original content andconcurrently displaying translated content when the user hovers a cursorover text of the original content, displaying the translated content andconcurrently displaying the original content when the user hovers acursor over text of the translated content, and displaying the originalcontent and the translated content side-by-side, one over the other, orin some other layout. Although these exemplary formats are provided,they are not intended to be all-inclusive or exhaustive of the formatspossible. Indeed, based on the teachings herein, those skilled in theart may recognize many other formats suitable for displaying originaland translated content.

Also, although the Web page illustrates six portions, it is to beunderstood that there may be more, fewer, or different-sized orconfigured portions without departing from the spirit or scope ofaspects of the subject matter described herein.

FIG. 4 is a block diagram that represents an apparatus configured inaccordance with aspects of the subject matter described herein. Thecomponents illustrated in FIG. 4 are exemplary and are not meant to beall-inclusive of components that may be needed or included. In otherembodiments, the components and/or functions described in conjunctionwith FIG. 4 may be included in other components (shown or not shown) orplaced in subcomponents without departing from the spirit or scope ofaspects of the subject matter described herein. In some embodiments, thecomponents and/or functions described in conjunction with FIG. 4 may bedistributed across multiple devices.

Turning to FIG. 4, the apparatus 405 may include browser components 410,a store 440, a communications mechanism 445, and other components (notshown). The apparatus 405 may be implemented on or as a computer (e.g.,as the computer 110 of FIG. 1).

The browser components 410 correspond to the Web browser 220 of FIG. 2.The browser components 410 may include a content retriever 415, arenderer 420, a code executer 425, a code injector 430, a user interface435, and other components (not shown).

The communications mechanism 445 allows the apparatus 405 to communicatewith other entities (e.g., the server 210, provider 215, and translationservice 217 of FIG. 2). The communications mechanism 445 may be anetwork interface or adapter 170, modem 172, or any other mechanism forestablishing communications as described in conjunction with FIG. 1.

The store 440 is any storage media capable of storing data and mayprovide access to data needed to render Web pages. The term data is tobe read to include information, program code, program state, programdata, other data, and the like. The store 440 may comprise a filesystem, database, volatile memory such as RAM, other storage, somecombination of the above, and the like and may be distributed acrossmultiple devices. The store 440 may be external, internal, or includecomponents that are both internal and external to the apparatus 405.Access as used herein may include reading data, writing data, deletingdata, updating data, a combination including two or more of the above,and the like.

The content retriever 415 is operable to obtain data corresponding to aWeb page. Data corresponding to the Web page may include one or morelanguages including, for example, HyperText Markup Language (HTML),Extensible Markup Language (XML), Extensible HyperText Markup Language(XHTML), another markup language, JavaScript, JScript, another type ofEMCAScript, another language, and the like. The content retriever 415may obtain this data from a Web server (e.g., the Web server 210 of FIG.2), a store (e.g., the store 440), another device, or the like.

The renderer 420 is operable to use the data obtained by the contentretriever 415 to create a graphical representation of the Web page todisplay on the user interface 435. This is sometimes referred to as“rendering” the Web page. In rendering a Web page, the renderer 420 mayfind a reference (e.g., a URI) to code in the data. The renderer 420 mayuse this reference to obtain the code, via the content retriever, from aservice external to the apparatus 405. This code, when executed, mayperform the functions of a translation component.

The code executer 425 is operable to execute the code obtained via thecontent retriever. In some embodiments, the code executer 425 may bepart of the renderer 420. Being executed in the context of the Web page,the code has access to other portions of the Web page.

The translation component that is instantiated by executing the code isoperable to send content from the Web page to a service external to theapparatus 405 and to receive translated content corresponding to thecontent from the service. The translation component may be furtheroperable to display the translated content in the Web page via the userinterface 435. The translation component may replace original contentwith translated content, display original and translated contentconcurrently (e.g., when a user hovers a cursor over content), or maydisplay original and translated content in other ways previouslyindicated.

In conjunction with sending original content to the translation service,the translation component may obtain one or more images that were notindicated by the Web page before translation. The one or more images maybe selected by the translation service to relate to the translatedcontent.

The code injector 430 is operable to place an identifier (sometimesreferred to as a “reference”) into a Web page. The identifier (e.g., aURI) indicates a service from which to obtain code corresponding to thetranslation component. When the renderer 420 finds the identifier, therenderer 420 may instruct the content retriever 415 to obtain the code.

The user interface 435 is operable to display a representation of thetranslation component and to receive input that indicates that atranslation is to be performed on content of the Web page.

FIGS. 5-8 are flow diagrams that generally represent actions that mayoccur in accordance with aspects of the subject matter described herein.For simplicity of explanation, the methodology described in conjunctionwith FIGS. 5-8 is depicted and described as a series of acts. It is tobe understood and appreciated that aspects of the subject matterdescribed herein are not limited by the acts illustrated and/or by theorder of acts. In one embodiment, the acts occur in an order asdescribed below. In other embodiments, however, the acts may occur inparallel, in another order, and/or with other acts not presented anddescribed herein. Furthermore, not all illustrated acts may be requiredto implement the methodology in accordance with aspects of the subjectmatter described herein. In addition, those skilled in the art willunderstand and appreciate that the methodology could alternatively berepresented as a series of interrelated states via a state diagram or asevents.

FIG. 5 is a block diagram that generally represents exemplary actionsthat may occur on a client in accordance with aspects of the subjectmatter described herein. Turning to FIG. 5, at block 505, the actionsbegin.

At block 510, data corresponding to a Web page is obtained. For example,referring to FIGS. 2 and 4, the content retriever 415 obtains datacorresponding to a Web page from the Web server 210.

At block 515, a translation component is obtained. This may involve, forexample:

1. Finding code within the data that references the translationcomponent;

2. Downloading the translation component from a source external to astore from which the data was obtained; and

3. Executing the translation component in the context of the Web page.Executing the translation component in the context of the Web pageallows the translation component to access other objects of the Webpage.

For example, referring to FIGS. 2 and 4, the renderer 410 may find areference to a translation component and may instruct the contentretriever 415 to download code corresponding to the translationcomponent from the translation component provider 215.

In some embodiment, a user interface may receive an indication that theuser desires to inject a translation component into a Web page. Inresponse, code that references the translation component may be placedinto the Web page. This code may then be used to download thetranslation component from an external source as indicated above.

At block 520, a representation of the translation component is displayedon the user interface. The translation component is integrated such thatit has access to content on the Web page. This is sometimes referred toas executing in the “context” of the Web page. For example, referring toFIG. 3, the translation component may be rendered similar to as shown inportion 315 of the Web page 305.

At block 525, input indicating that translation is to be performed onthe Web page is received. This input may be received through a userinterface and may be delivered to the translation component. Forexample, referring to FIG. 4, the user interface 435 may receive useinput (e.g., a mouse click) that indicates that the user desires to havea Web page translated.

At block 530, the Web page (or a portion thereof) is translated. Thismay involve, for example:

1. Obtaining at least a portion of the Web page via the translationcomponent;

2. Sending the portion of the Web page to a translation service; and

3. Receiving a translation of the portion of the Web page from thetranslation service.

For example, referring to FIG. 2, the translation component 225 mayobtain a portion of the Web page and may send the portion to thetranslation service 217 for translation. In response, the translationcomponent 225 may receive a translation of the portion.

At block 535, the translation is displayed under control of thetranslation component. Displaying under control of the translationcomponent may involve changing text, images, or otherwise in a Web pageand causing a refresh of the Web page, displaying a portion of the Webpage together with a translation upon receiving an indication of acursor being on or close to the portion, creating a new Web page thatincludes the translated text and causing the new page to be displayed,and the like. For example, referring to FIG. 4, the user interface 435may be used to display the translation in any of the ways previouslymentioned.

At block 540, other actions, if any, are performed.

FIG. 6 is a block diagram that generally represents exemplary actionsthat may occur in creating and providing a Web page having a referenceto a translation component in accordance with aspects of the subjectmatter described herein. At block 605, the actions begin.

At block 610, a Web page is created that includes a reference. Thereference indicates code (e.g., a script) that is external to the Webpage. The reference is usable to locate and download the code (e.g.,from a translation component provider). The code is structured toexecute in the context of the Web page such that it is able to accessother objects in the Web page. The code, when executed, implements atranslation component. The code is structured to receive input thatindicates that the Web page is to be translated. In response toreceiving the input, the code obtains content from the Web page and sendthe content (e.g., either directly or indirectly) to a translationservice to translate the content. When the translated content isreceived, the code causes the translated content to be displayed. Forexample, referring to FIG. 2, a Web developer may develop a Web page andplace a reference to the translation component provider in the Web page.

At block 615, a request for data corresponding to the Web page isreceived. For example, referring to FIG. 2, the Web server 210 mayreceive a request for the Web page from the Web browser 220 of theclient 205.

At block 620, the data corresponding to the Web page is provided to therequester. For example, referring to FIG. 2, the Web server 210 sendsthe requested data to the Web browser 220.

At block 625, other actions, if any, may be performed.

FIG. 7 is a block diagram that generally represents exemplary actionsthat may occur in providing code for a translation component inaccordance with aspects of the subject matter described herein. At block705, the actions begin.

At block 710, a request for the code of the translation component isreceived. For example, referring to FIG. 2, the Web browser 220 mayrequest code for the translation component 225 from the translationcomponent provider 215.

At block 715, the code is provided to the requester. For example,referring to FIG. 2, the translation component provider 215 sends thecode to the Web browser 220.

At block 720, other actions, if any, are performed.

FIG. 8 is a block diagram that generally represents exemplary actionsthat may occur in translating content in accordance with aspects of thesubject matter described herein. At block 805, the actions begin.

At block 810, a content to translate is received from a requester. Forexample, referring to FIG. 2, the translation component provider 215 mayreceive content to translate from the translation component 225.

At block 815, data derived from the request is sent to a translationservice. For example, referring to FIG. 2, the translation component mayadd or remove tags or otherwise modify the content before sending it tothe translation service 217 for translation.

At block 820, translated content corresponding to the sent content isreceived. For example, referring to FIG. 2, the translation componentprovider 215 may receive translated content from the translation service217.

At block 825, data derived from the translated content is sent to therequester. For example, referring to FIG. 2, the translation componentprovider 215 may add or remove tags or otherwise modify the translatedcontent before sending it to the translation component 225.

For example, tags may be added that indicate the translated content.When a user hovers over the original content, the translated content maybe displayed while the original content is highlighted.

As another example, tags may be added to indicate the original content.The translated content may then be displayed. When a user hovers overthe translated content, the original content may be displayed while thetranslated content is highlighted.

At block 830, other actions, if any, are performed.

Although reference has been made herein to a reference to a translationcomponent that is embedded in a Web page, in other embodiments, such areference may be embedded in other types of documents. For example, areference to a translation component may be inserted into a visualdevelopment environment, into a text document, a spreadsheet, adatabase, or virtually any other type of document. The applicationrendering the document may retrieve the translation component anddisplay it similarly to that described previously.

It will be recognized that aspects of the subject matter describedherein may operate transparently behind a firewall. For example,whatever pages a Web browser is able to access from behind a firewall,the translation component is also able to access.

As can be seen from the foregoing detailed description, aspects havebeen described related to language translation. While aspects of thesubject matter described herein are susceptible to various modificationsand alternative constructions, certain illustrated embodiments thereofare shown in the drawings and have been described above in detail. Itshould be understood, however, that there is no intention to limitaspects of the claimed subject matter to the specific forms disclosed,but on the contrary, the intention is to cover all modifications,alternative constructions, and equivalents falling within the spirit andscope of various aspects of the subject matter described herein.

1. A method implemented at least in part by a computer, the methodcomprising: obtaining data corresponding to a Web page; displaying, on auser interface, a representation of a translation component, thetranslation component being integrated in the Web page such that thetranslation component has access to content in the Web page; receiving,via the user interface, input to the translation component, the inputindicating that translation is to be performed on the Web page;obtaining at least a portion of the Web page via the translationcomponent; sending the at least a portion of the Web page to atranslation service; receiving a translation of the at least a portionof the Web page from the translation service; and displaying, undercontrol of the translation component, the translation of the at least aportion of the Web page on the user interface.
 2. The method of claim 1,further comprising: finding code within the data that references thetranslation component; and downloading the translation component from asource external to a store from which the data was obtained; andexecuting the translation component in a context of the Web page.
 3. Themethod of claim 2, wherein finding code within the data comprisesfinding a tag that references the source.
 4. The method of claim 1,further comprising receiving an indication to inject the translationcomponent into the Web page and in response placing code that referencesto the translation component into the Web page.
 5. The method of claim1, wherein obtaining at least a portion of the Web page via thetranslation component comprises enumerating, via the translationcomponent, one or more objects of a document object model correspondingto the Web page.
 6. The method of claim 1, wherein displaying, undercontrol of the translation component, the translation of the at least aportion of the Web page on the user interface comprises replacing the atleast a portion of the Web page with the translation.
 7. The method ofclaim 1, wherein displaying the translation of the at least a portion ofthe Web page on the user interface comprises displaying the at least aportion of the Web page on the user interface together with thetranslation upon receiving an indication of a cursor being on or closeto the at least a portion.
 8. The method of claim 1, wherein obtainingat least a portion of the Web page via the translation componentcomprises obtaining a first image from the Web page and whereinreceiving a translation of the at least a portion of the Web page fromthe translation service comprises receiving a second image related tothe translation.
 9. A computer storage medium having computer-executableinstructions, which when executed perform actions, comprising: placing areference in first data that corresponds to a Web page, the referenceindicating code that is external to the first data, the reference usableto locate and download the code, the code structured to execute incontext of the Web page, to receive an indication to translate contentin the Web page, and in response to receiving the indication to obtainfirst content from the Web page, to send the first content to atranslation service to translate the first content into translatedcontent, and to display the translated content; receiving a request forthe first data from a requester; and providing the first data to therequester.
 10. The computer storage medium of claim 9, furthercomprising: receiving a request for the code from the requester; andsending the code to the requester.
 11. The computer storage medium ofclaim 10, further comprising determining, based on information includedin the request, whether to send the code to the requester.
 12. Thecomputer storage medium of claim 9, further comprising: receiving thefirst content from the requester; sending second data derived from thefirst content to a translation service; receiving translated contentcorresponding to the first content from the translation service; andsending third data derived from the translated content to the requester.13. The computer storage medium of claim 12, further comprising creatingthe third data by adding tags to the first content, the tags indicatingthe translated content.
 14. The computer storage medium of claim 12,further comprising creating the third data by adding tags to thetranslated content, the tags indicating the first content.
 15. In acomputing environment, an apparatus, comprising: a content retrieveroperable to obtain data corresponding to a Web page; a user interfaceoperable to display a representation of a translation component and toreceive input that indicates that a translation is to be performed oncontent of the Web page; and a code executer operable to execute codecorresponding to the translation component, the code, when executed,having access to other portions of the Web page, the translationcomponent operable to send first content from the Web page to a serviceexternal to the apparatus and to receive translated contentcorresponding to the first content from the service, the translationcomponent further operable to display the translated content in the Webpage via the user interface.
 16. The apparatus of claim 15, furthercomprising a renderer operable to use the data to create a graphicalrepresentation of the Web page to display on the user interface and tofind a reference to the code in the data and to obtain the code usingthe reference, via the content retriever, from a service external to theapparatus.
 17. The apparatus of claim 15, further comprising an injectoroperable to place an identifier into the Web page, the identifierindicating a service from which to obtain the code.
 18. The apparatus ofclaim 15, wherein the translation component is further operable toreplace the first content with the translated content in conjunctionwith obtaining the translated content.
 19. The apparatus of claim 15,wherein the translation component is further operable to indicate thatthe first content be displayed concurrently with the translated content.20. The apparatus of claim 15, wherein the translation component isfurther operable, in conjunction with sending the first content to theservice, to obtain at least one image that was not indicated by the Webpage before translation, the at least one image related to thetranslated content.